import java.io.File;
import java.io.FileInputStream;

public class ReadTestSet {
	static byte[][] input;
	static byte[] label;
	static int ROWS;
	static int COLS;

	public static void main(String[] args) throws Exception {
		File file;
		FileInputStream fis;

		file = new File("../label.txt");
		fis = new FileInputStream(file);
		ROWS = (int) file.length();
		label = new byte[ROWS];
		fis.read(label);

		File folder = new File("../inputs");
		File[] listOfFiles = folder.listFiles();
		COLS = listOfFiles.length;
		input = new byte[COLS][ROWS];

		for (int c = 0; c < COLS; c++) {
			if (listOfFiles[c].isFile()) {
				fis = new FileInputStream(listOfFiles[c]);
				fis.read(input[c]);
			}
		}

		System.out.println(label.length);
		System.out.println(input[0].length);

		for (int r = 0; r < 30; r++) {
			for (int c = 0; c < COLS; c++) {
				System.out.printf("% 6d", input[c][r]);
			}
			System.out.println("  " + label[r]);
		}
	}
}
